Time-Machine Backup to NAS storage
Requirements:
OSX 10.5.6 or later (length of the hostname should be kept wintin eight characters)
How to Backup to a NAS Box using Time Machine backup.
1 - Open the Terminal application.
2 - We need to create a blank file-system sparse bundle file by pasting in:
HN=`hostname | cut -f1 -d.`;MA=`ifconfig en0 | egrep ether | sed "s|:||g" | cut -f2 -d' '`;hdiutil create -size 350g -fs HFS+J -volname "TM_$HN" $HN\_$MA.sparsebundle
Note: you will need to specify the size of the destination file-system, this is compacted and created in the users folder top level, the filename will be made up from the machine name and Mac address.
3 - Mount the NAS box with connect to server from the go menu e.g.
afp://192.168.150.248/NAS_Backup
Note: substitute the IP and volume names.
4 - Now we need to copy the sparse bundle file to the NAS Box by:
rsync -avE eight_002332123456.sparsebundle /Volumes/NAS_Backup/
Note: remember to substitute the correct filename for your system i.e. replace eight_002332123456.sparsebundle
5 - Now we need to remove the sparse bundle file from the Mac using:
rm -rf /Users/sodium/eight_002332123456.sparsebundle
Note: remember to substitute the correct filename for your system i.e. replace eight_002332123456.sparsebundle
6 - Now we need to tell the Mac to show non Apple Time Machine destinations by typing:
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
7 - Now go to the Time Machine preferences and select the NAS_Backup drive as the destination.
8 - Go to the Spotlight preferences and add the NAS_Backup to the ignore list so that it is not catalogued.
This will now backup accross the network to the NAS box using Time Machine.
How to Restore from a NAS Box Time Machine backup.
To restore files and folders you can just open the Time Machine application as normal or to fully restore the whole hard drive you will need to boot from the install DVD
1 - Boot from the install DVD
2 - If you need to wipe the hard drive then Open Disk Utility from the Utilities menu and format the drive
3 - To restore the whole drive select Restore System from Backup from Utilities menu
Note: If your Time Machine backup set appears, then restore away or if the button to connect to a remote disk is not click-able then you will have to mount the network volume manually.
4 - To Mount the network volume open Terminal from the Utilities Menu and type the following before using Restore System from Backup
mkdir /Volumes/NAS_Backup
mount -t afp afp://username:password@192.168.150.248/NAS_Backup /Volumes/NAS_Backup
exit
Note: remember to substitute your username, volume, password, and so forth, if you are connecting as guest then omit 'username:password@'